package com.slipper.gen.entity;

import com.slipper.gen.util.Tool;

import java.util.List;
import java.util.Map;

public class TableEntity {
    //表的名称
    private String tableName;
    //表的备注
    private String comments;
    //表的主键
    private ColumnEntity pk;
    private List<ColumnEntity> columns;
    private String className;
    private String classname;
    
    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getComments() {
        return comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public ColumnEntity getPk() {
        return pk;
    }

    public void setPk(ColumnEntity pk) {
        this.pk = pk;
    }

    public List<ColumnEntity> getColumns() {
        return columns;
    }

    public void setColumns(List<ColumnEntity> columns) {
        this.columns = columns;
    }

    public String getClassName() {
        return className;
    }

    public void setClassName(String className) {
        this.className = className;
    }

    public String getClassname() {
        return classname;
    }

    public void setClassname(String classname) {
        this.classname = classname;
    }


    public void fillProp(Map<String, Object> map) {
        map.put("tableName", this.getTableName());
        map.put("comments", this.getComments());
        map.put("pk", this.getPk());
        map.put("className", this.getClassName());
        map.put("classname", this.getClassname());
        map.put("columns", this.getColumns());
        map.put("menuId", Tool.getUUID());
        map.put("opAddId", Tool.getUUID());
        map.put("opEditId", Tool.getUUID());
        map.put("opDelId", Tool.getUUID());
    }
}
